using ASP;
using HoWave.Web;
using HoWave.Web.Shop;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class Shop_browse_index : Shop, IRequiresSessionState
{
	protected Literal ShopClassList;
	protected HtmlForm form_1;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_PreInit(object sender, EventArgs e)
	{
		Template.BindTemplateToPage(this.Page, "ShopIndex");
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		base.ShowCityArea();
		this.ShopClassList.Text = this.bandshopclass();
	}
	public string bandshopclass()
	{
		Shop_Class shop_Class = new Shop_Class();
		DataTable allParentClass = shop_Class.GetAllParentClass(0);
		string text = "";
		int num = 0;
		for (int i = 0; i < allParentClass.Rows.Count; i++)
		{
			num++;
			text = text + "<div class=\"ShopCateL1\">" + Environment.NewLine;
			string text2 = text;
			text = string.Concat(new string[]
			{
				text2,
				"   <div class=\"hp\">",
				allParentClass.Rows[i]["ClassName"].ToString(),
				"</div>",
				Environment.NewLine
			});
			text = text + "         <ul class= \"CategoryListNormalLevel1\" >" + Environment.NewLine;
			object obj = text;
			text = string.Concat(new object[]
			{
				obj,
				"            <li><a href='ShopList.aspx?ParentID=",
				allParentClass.Rows[i]["Classid"],
				"' target='_blank'>",
				allParentClass.Rows[i]["ClassName"].ToString(),
				"/</a></li>",
				Environment.NewLine
			});
			text = text + "         </ul>" + Environment.NewLine;
			text = text + "</div>" + Environment.NewLine;
			if ((num + 4) % 3 != 0)
			{
				text += "<div class=\"ShopCateL2\"></div>";
			}
		}
		return text;
	}
}
